home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XA_6S.ZIP / SOURCE / EVNT_TMR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-30  |  684 b   |  34 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #include <MINTBIND.H>
  9. #include <OSBIND.H>
  10. #include <SIGNAL.H>
  11. #include "k_defs.h"
  12. #include "xa_types.h"
  13. #include "xa_globl.h"
  14.  
  15. /*
  16.     Evnt_timer()
  17. */
  18.  
  19. unsigned long XA_evnt_timer(short clnt_pid, AESPB *pb)
  20. {
  21.     unsigned long ret;
  22.     
  23.     if (pb->intin[1])
  24.         ret=0xffff0000L|XAC_T_TIMEOUT;
  25.     else
  26.         ret=((pb->intin[0])<<16)|XAC_T_TIMEOUT;
  27.         
  28.     clients[clnt_pid].waiting_pb=pb;            /* Store a pointer to the AESPB to fill when the event */
  29.                                                 /*  finally arrives. */
  30.     clients[clnt_pid].waiting_for=XAWAIT_TIMER;    /* Flag the app as waiting for a timer */
  31.  
  32.     return ret;
  33. }
  34.